package threshold;

public class ThresholdFactory {
	public static MaxNDCRThresholdFinder getFinder(String type) {
		MaxNDCRThresholdFinder finder;
		if(type.compareTo("max_ndcr") == 0) {
			finder = new MaxNDCRThresholdFinder();
		} else if(type.compareTo("rank_thresh") == 0){
			finder = new RankNDCRThresholdFinder();
		} else if(type.compareTo("ratio_thresh") == 0){
			finder = new RatioNDCRThresholdFinder();
		} else if(type.compareTo("pratio_thresh") == 0){
			finder = new PositiveRatioNDCRThresholdFinder();
		} else {
			throw new RuntimeException();
		}
		return finder;
	}
}
